package bookez.model.businessobject;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@NamedQueries ({
	
	@NamedQuery (
		name = "findByUsername",
		query = "from User as user where user.username = :username"		
	),//end NamedQuery findById
	
})//end collections of NamedQuery

@Entity
@Table( name = "users" )
public class User extends BusinessObject implements Serializable {
	
	public static class NamedQueries {
		public static final String FIND_BY_USERNAME = "findByUsername";
	}//end section NamedQueries
	
	
	@Id
	@GeneratedValue
	public Long getId() { return this.id; }
	public void setId( Long value ) { this.id = value; }
	
	
	public String getUsername() { return this.username; }
	public void setUsername( String value ) { this.username = value; }
	
	public String getPassword() { return this.password; }
	public void setPassword( String value ) { this.password = value; }
	
	
	private Long id;
	private String username;
	private String password;
	
	
	private static final long serialVersionUID = -6349388836245305236L;
}//end class User
